/*
 * Copyright (c) 2018.
 * http://www.ulabcare.com
 */

package com.mt.roll.upms.params;

import com.mt.roll.core.base.BaseParam;
import com.mt.roll.core.validator.groups.AddGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * <p>
 * 菜单资源关系表
 * </p>
 *
 * @author jiff
 * @date 2018/11/27
 * @since 1.0
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "菜单资源关系表", description = "用于新增菜单资源关系")
public class MenuResourceParam extends BaseParam {

    private static final long serialVersionUID = 1L;

    /**
     * 菜单ID
     */
    @ApiModelProperty(value = "菜单ID", required = true, example = "1")
    @NotNull(message = "菜单ID不能为空")
    private Long menuId;

    /**
     * 资源ID列表
     */
    @ApiModelProperty(value = "资源ID列表", required = true, example = "[1]")
    @NotNull(message = "资源ID列表不能为空", groups = {AddGroup.class})
    @Size(message = "资源ID列表不能为空", min = 1, groups = {AddGroup.class})
    private List<Long> resourceIds;

}
